﻿using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using Google.Protobuf;
using Google.Protobuf.Reflection;

namespace EggLink.DanhengServer.Proto
{
	// Token: 0x02000B11 RID: 2833
	[DebuggerDisplay("{ToString(),nq}")]
	public sealed class MessageItem : IMessage<MessageItem>, IMessage, IEquatable<MessageItem>, IDeepCloneable<MessageItem>, IBufferMessage
	{
		// Token: 0x170023CD RID: 9165
		// (get) Token: 0x06007EE0 RID: 32480 RVA: 0x00152CA8 File Offset: 0x00150EA8
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public static MessageParser<MessageItem> Parser
		{
			get
			{
				return MessageItem._parser;
			}
		}

		// Token: 0x170023CE RID: 9166
		// (get) Token: 0x06007EE1 RID: 32481 RVA: 0x00152CAF File Offset: 0x00150EAF
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public static MessageDescriptor Descriptor
		{
			get
			{
				return MessageItemReflection.Descriptor.MessageTypes[0];
			}
		}

		// Token: 0x170023CF RID: 9167
		// (get) Token: 0x06007EE2 RID: 32482 RVA: 0x00152CC1 File Offset: 0x00150EC1
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		MessageDescriptor IMessage.Descriptor
		{
			get
			{
				return MessageItem.Descriptor;
			}
		}

		// Token: 0x06007EE3 RID: 32483 RVA: 0x00152CC8 File Offset: 0x00150EC8
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public MessageItem()
		{
		}

		// Token: 0x06007EE4 RID: 32484 RVA: 0x00152CD0 File Offset: 0x00150ED0
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public MessageItem(MessageItem other) : this()
		{
			this.textId_ = other.textId_;
			this.itemId_ = other.itemId_;
			this._unknownFields = UnknownFieldSet.Clone(other._unknownFields);
		}

		// Token: 0x06007EE5 RID: 32485 RVA: 0x00152D01 File Offset: 0x00150F01
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public MessageItem Clone()
		{
			return new MessageItem(this);
		}

		// Token: 0x170023D0 RID: 9168
		// (get) Token: 0x06007EE6 RID: 32486 RVA: 0x00152D09 File Offset: 0x00150F09
		// (set) Token: 0x06007EE7 RID: 32487 RVA: 0x00152D11 File Offset: 0x00150F11
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public uint TextId
		{
			get
			{
				return this.textId_;
			}
			set
			{
				this.textId_ = value;
			}
		}

		// Token: 0x170023D1 RID: 9169
		// (get) Token: 0x06007EE8 RID: 32488 RVA: 0x00152D1A File Offset: 0x00150F1A
		// (set) Token: 0x06007EE9 RID: 32489 RVA: 0x00152D22 File Offset: 0x00150F22
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public uint ItemId
		{
			get
			{
				return this.itemId_;
			}
			set
			{
				this.itemId_ = value;
			}
		}

		// Token: 0x06007EEA RID: 32490 RVA: 0x00152D2B File Offset: 0x00150F2B
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public override bool Equals(object other)
		{
			return this.Equals(other as MessageItem);
		}

		// Token: 0x06007EEB RID: 32491 RVA: 0x00152D39 File Offset: 0x00150F39
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public bool Equals(MessageItem other)
		{
			return other != null && (other == this || (this.TextId == other.TextId && this.ItemId == other.ItemId && object.Equals(this._unknownFields, other._unknownFields)));
		}

		// Token: 0x06007EEC RID: 32492 RVA: 0x00152D78 File Offset: 0x00150F78
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public override int GetHashCode()
		{
			int num = 1;
			if (this.TextId != 0U)
			{
				num ^= this.TextId.GetHashCode();
			}
			if (this.ItemId != 0U)
			{
				num ^= this.ItemId.GetHashCode();
			}
			if (this._unknownFields != null)
			{
				num ^= this._unknownFields.GetHashCode();
			}
			return num;
		}

		// Token: 0x06007EED RID: 32493 RVA: 0x00152DD0 File Offset: 0x00150FD0
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public override string ToString()
		{
			return JsonFormatter.ToDiagnosticString(this);
		}

		// Token: 0x06007EEE RID: 32494 RVA: 0x00152DD8 File Offset: 0x00150FD8
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public void WriteTo(CodedOutputStream output)
		{
			output.WriteRawMessage(this);
		}

		// Token: 0x06007EEF RID: 32495 RVA: 0x00152DE4 File Offset: 0x00150FE4
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		void IBufferMessage.InternalWriteTo(ref WriteContext output)
		{
			if (this.TextId != 0U)
			{
				output.WriteRawTag(24);
				output.WriteUInt32(this.TextId);
			}
			if (this.ItemId != 0U)
			{
				output.WriteRawTag(48);
				output.WriteUInt32(this.ItemId);
			}
			if (this._unknownFields != null)
			{
				this._unknownFields.WriteTo(ref output);
			}
		}

		// Token: 0x06007EF0 RID: 32496 RVA: 0x00152E40 File Offset: 0x00151040
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public int CalculateSize()
		{
			int num = 0;
			if (this.TextId != 0U)
			{
				num += 1 + CodedOutputStream.ComputeUInt32Size(this.TextId);
			}
			if (this.ItemId != 0U)
			{
				num += 1 + CodedOutputStream.ComputeUInt32Size(this.ItemId);
			}
			if (this._unknownFields != null)
			{
				num += this._unknownFields.CalculateSize();
			}
			return num;
		}

		// Token: 0x06007EF1 RID: 32497 RVA: 0x00152E98 File Offset: 0x00151098
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public void MergeFrom(MessageItem other)
		{
			if (other == null)
			{
				return;
			}
			if (other.TextId != 0U)
			{
				this.TextId = other.TextId;
			}
			if (other.ItemId != 0U)
			{
				this.ItemId = other.ItemId;
			}
			this._unknownFields = UnknownFieldSet.MergeFrom(this._unknownFields, other._unknownFields);
		}

		// Token: 0x06007EF2 RID: 32498 RVA: 0x00152EE8 File Offset: 0x001510E8
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public void MergeFrom(CodedInputStream input)
		{
			input.ReadRawMessage(this);
		}

		// Token: 0x06007EF3 RID: 32499 RVA: 0x00152EF4 File Offset: 0x001510F4
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		void IBufferMessage.InternalMergeFrom(ref ParseContext input)
		{
			uint num;
			while ((num = input.ReadTag()) != 0U)
			{
				if (num != 24U)
				{
					if (num != 48U)
					{
						this._unknownFields = UnknownFieldSet.MergeFieldFrom(this._unknownFields, ref input);
					}
					else
					{
						this.ItemId = input.ReadUInt32();
					}
				}
				else
				{
					this.TextId = input.ReadUInt32();
				}
			}
		}

		// Token: 0x04003089 RID: 12425
		private static readonly MessageParser<MessageItem> _parser = new MessageParser<MessageItem>(() => new MessageItem());

		// Token: 0x0400308A RID: 12426
		private UnknownFieldSet _unknownFields;

		// Token: 0x0400308B RID: 12427
		public const int TextIdFieldNumber = 3;

		// Token: 0x0400308C RID: 12428
		private uint textId_;

		// Token: 0x0400308D RID: 12429
		public const int ItemIdFieldNumber = 6;

		// Token: 0x0400308E RID: 12430
		private uint itemId_;
	}
}
